package com.example.api.repository;

import com.example.api.entity.Category;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface CategoryRepository extends JpaRepository<Category, String> {
    @Query("SELECT c FROM Category c WHERE c.categoryId LIKE %:keyword%")
    List<Category> findByCategoryIdContaining(@Param("keyword") String keyword);
}